package com.example.dto;

import java.util.List;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class QuestionRequest {
    
    // 试题内容
    @NotBlank(message = "试题内容不能为空")
    private String content;
    
    // 试题类型: MULTIPLE_CHOICE(选择题), TRUE_FALSE(判断题), FILL_BLANK(填空题), SHORT_ANSWER(简答题)
    @NotBlank(message = "试题类型不能为空")
    private String type;
    
    // 试题难度: 1-5
    @NotNull(message = "试题难度不能为空")
    @Min(value = 1, message = "难度最小为1")
    @Max(value = 5, message = "难度最大为5")
    private Integer difficulty;
    
    // 分数
    @NotNull(message = "分数不能为空")
    @Min(value = 1, message = "分数最小为1")
    private Integer score;
    
    // 选项内容 (用于选择题，判断题等)
    private List<String> options;
    
    // 正确答案
    @NotNull(message = "答案不能为空")
    @Size(min = 1, message = "至少需要一个答案")
    private List<String> answers;
    
    // 答案解析
    private String explanation;
    
    // 所属章节/知识点
    private String knowledgePoint;
} 